import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  //获取构件施工列表数据
  getConsInfo: {
    url: '/api/v1/jt_construct/get_cons_info',
    method: 'get'
  },
  //新增构件施工
  addConsInfo: {
    url: '/api/v1/jt_construct/get_cons_info',
    method: 'post'
  },
  //修改构件施工
  editConsInfo: {
    url: '/api/v1/jt_construct/get_cons_info',
    method: 'put',
    type: 'restful'
  },
  //查看详情
  detailConsInfo: {
    url: '/api/v1/jt_construct/get_cons_info',
    method: 'get',
    type: 'restful'
  },
  //删除构件施工
  delConsInfo: {
    url: '/api/v1/jt_construct/get_cons_info',
    method: 'delete',
    type: 'restful'
  },
  //施工项目下拉
  getConsProjectList: {
    url: '/api/v1/jt_project/project_select',
    method: 'get'
  },
  //获取施工项目列表数据
  getProjectList: {
    url: '/api/v1/jt_construct/get_project_list',
    method: 'get'
  },
  //修改项目
  editProject: {
    url: '/api/v1/jt_construct/get_project_list',
    method: 'put',
    type: 'restful'
  },
  //查看施工项目
  detailConsProject: {
    url: '/api/v1/jt_construct/get_project_list',
    method: 'get',
    type: 'restful'
  },
  //所属单位保存时触发的事件
  consCompanyIssu: {
    url: '/api/v1/jt_construct/unit_all',
    method: 'post'
  }
}
export default buildService(settings)
